﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExcelImportDialog.ascx.cs" Inherits="Analysis.Controls.ExcelImportDialog" %>

<script type="text/javascript">
    $(function () {
        $("#excelImportDialog").dialog({ modal: true, autoOpen: false, width: 650, resizable: false });
        $("#excelImportDialog").parent().appendTo(jQuery("form:first"));
        $(".ui-dialog-titlebar").hide();
    });

    function openExcelImportDialog() {
        $('#excelImportDialog').dialog('open');
    }
</script>

<div id="excelImportDialog">
    <asp:UpdatePanel runat="server" ID="upExcelImport" OnLoad="upExcelImport_Load" UpdateMode="Conditional">
    <ContentTemplate>
        <div class="fieldset_block col-lg-12 page_area">
        <fieldset>
            <legend><h4>Импорт из Excel</h4></legend>
            <div class="fieldset_cotent form-horizontal">
                <div class="row">
                    <div class="col-lg-12">                                    
                        <div class="form-group">
                            <label class="col-lg-4 control-label">Файл для импорта</label>
                            <div class="col-lg-8">
                                <asp:FileUpload runat="server" ID="fuExcel" CssClass="form-control"/>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="fuExcel" runat="server" Text="*" ValidationGroup="excelImport" CssClass="validation_message" Display="Dynamic" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="button_group">
                    <asp:Button CssClass="btn btn-info" ID="btnImport" Text="Импорт" runat="server" ValidationGroup="excelImport" onclick="btnImport_Click" OnClientClick="if (Page_ClientValidate('excelImport')) BlockInt('Обработка данных...');" />
                    <asp:Button CssClass="btn btn-info" ID="btnCancel" Text="Закрыть" runat="server" OnClientClick="$('#excelImportDialog').dialog('close'); return false;" /> 
                </div>
            </div>
        </fieldset>
        </div>
    </ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="btnImport" />
    </Triggers>
    </asp:UpdatePanel>
</div>
